<template>
	<view>
		<view class="steps-con">
			<view class="item" v-for="(item, index) in stepOptions" :key="index">
				<view class="line" v-if="item.show"></view>
				<view class="dot-line" v-else></view>
				<view :class="['number', {opa: !item.show}]">{{ item.step }}</view>
				<view :class="['status', {opa: !item.show}]">{{ item.val }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loading: true, // 是否显示骨架屏组件
			}
		},
		props: {
			stepOptions: {
				type: Array,
				default: () => {
					return []
				}
			}
		},
		methods: {
			onLoad() {
				setTimeout(() => {
					this.loading = false
				}, 2000)
			},
		}
	}
</script>

<style lang="scss">
	.steps-con {
		display: flex;
		justify-content: center;
		margin: 0 30rpx;
		.item {
			display: flex;
			align-items: center;
			.number {
				width: 44rpx;
				height: 44rpx;
				background-color: #d9b975;
				color: #fff;
				text-align: center;
				line-height: 44rpx;
				border-radius: 50%;
				font-size: 30rpx;
			}
			.status {
				font-size: 28rpx;
				color: #d9b975;
				padding-left: 4rpx;
			}
			.opa {
				opacity: 0.6;
			}
			.line {
				width: 64rpx;
				height: 4rpx;
				background-color: #d9b975;
				border-radius: 4px;
				margin: 0 20rpx;
			}
			.dot-line {
				width: 64rpx;
				border-bottom: 4rpx dotted #d9b975;
				opacity: 0.5;
				margin: 0 20rpx;
			}
			
		}
		.item:first-child {
			.line,.dot-line {
				display: none;
			}
		}
	}
</style>

